home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 14
/
Hot Mix 14.iso
/
HTML
/
vendors
/
finesse
/
examples
/
sh
/
software
< prev
next >
Wrap
Text File
|
1996-06-27
|
2KB
|
120 lines
#! /bin/sh
# FINESSEAPPLICATIONKEY sEdDPeUptwYqV
#
# Skeleton for Script "scsoftware" that puts
# together a software distribution from data
# of a Finesse window. Data checking and
# processing is only indicated.
. ${FINESSEPATH-/usr/local/finesse}/fsshinit
# Define window and open server
# -----------------------------
define_window ()
{
deutsch=German
englisch=English
title="Software Distribution"
sware="Software:"
tlimit="Time limit (Months):"
language=Language:
htype="Host Type:"
nrtoday="Series Number:"
error=Error
qic="QIC150"
floppy="Floppy"
exa=Exabyte
windef="
FsWindow -name winname
-title '$title'
-btype oxa ;
FsSeparator ;
FsText -label Customer
-var customer ;
FsText -label '$sware'
-var software=PolyScan ;
FsText -label '$tlimit'
-var nmonths=2;
FsText -label '$nrtoday'
-var nrheute=1435a34;
FsSeparator ;
FsOptionMenu -label '$htype'
-var machine=sun4
-items 'iris4d sun4 rs6000 hp9000s700';
FsOptionMenu -label Medium:
-var medium=$qic
-items '$qic $exa $floppy';
FsOptionMenu -label $language
-var sprache=$englisch
-items '$deutsch $englisch';
FsSeparator ;"
Fsopen "$@"
}
# Window dialog:
# Display window, check values,
# redisplay window on error
# -----------------------------
display_window ()
{
Fsdisplay -m "$title" -w "$windef"
if [ "$fsbutton" != "o" ] ; then
Fsclose; exit
else
while :
do
check_vars
if [ $? -eq 0 ] ; then
break
else
Fsdisplay -n winname -m "$errormessage"
if [ "$fsbutton" != "o" ] ; then
exit
fi
fi
done
fi ;
}
check_vars ()
{
# just check time limit, default if not set
#
if [ \( ${nmonths:=2} -lt 2 \) -o \
\( ${nmonths:=2} -gt 12 \) ] ; then
errormessage="$error: $tlimit"
return 1
fi
return 0 ;
}
# Process data
# ------------
process_data ()
{
Fssave
Fsecho "OK. Processing. Please wait..."
sleep 3 # Just pretend to do so
Fsecho Done.
sleep 1
Fsclose
exit 0
}
# main script
# -----------
define_window "$@"
display_window
process_data